/**
 * Vue实例挂载公用常用的变量、函数、计算属性
 */
export default {
  data() {
    return {}
  },
  computed: {
    lang() {
		  return this.$store.getters.lang
    },
    token() {
		  return this.$store.getters.token
    },
    uid() {
      return this.$store.getters.uid
    },
 
  
  },
  created() {},
  methods: {
    isLogin() {
		  return !(uni.$u.test.isEmpty(this.token) )
    },
   
    copy (text) {
      uni.setClipboardData({
        data: `${text}`,
        success: () => {
          uni.$u.toast(this.$t('public.t6'))
        }
      })
    },
    getCaption(strings) {
		  const strLength = strings.length
		  const shortName = strings.substring(0, 5)
		  const shortName2 = strings.substring(strLength - 4, strLength)
		  let str = `${shortName}***${shortName2}`
		  return str
    }
  }
}
